package top.lixunda.commerce.common.core.controller.wrapper;

import top.lixunda.commerce.common.core.utils.EntityGetFunction;

import java.util.List;
import java.util.Map;

/**
 * @author LiXunda
 * @version time:2019/10/14 12:56
 */
@SuppressWarnings({"unused", "unchecked"})
public interface ILambdaAbstractSqlWrapper<T> extends IAbstractSqlWrapper<T> {

    /**
     * groupBy
     *
     * @param column 类名，使用get方法
     * @return ILambdaAbstractSqlWrapper<T>
     */
    ILambdaAbstractSqlWrapper<T> groupBy(EntityGetFunction<T, ?> column);

    ILambdaAbstractSqlWrapper<T> groupBy(EntityGetFunction<T, ?>... columns);

    ILambdaAbstractSqlWrapper<T> orderBy(EntityGetFunction<T, ?> column, String type);

    ILambdaAbstractSqlWrapper<T> orderByAsc(EntityGetFunction<T, ?>... column);

    ILambdaAbstractSqlWrapper<T> orderByDesc(EntityGetFunction<T, ?>... column);

    ILambdaAbstractSqlWrapper<T> having(EntityGetFunction<T, ?> column);

    ILambdaAbstractSqlWrapper<T> eq(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> ne(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> gt(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> ge(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> lt(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> le(EntityGetFunction<T, ?> column, Object value);

    ILambdaAbstractSqlWrapper<T> between(EntityGetFunction<T, ?> column, Object value1, Object value2);

    ILambdaAbstractSqlWrapper<T> notBetween(EntityGetFunction<T, ?> column, Object value1, Object value2);

    ILambdaAbstractSqlWrapper<T> like(EntityGetFunction<T, ?> column, String value);

    ILambdaAbstractSqlWrapper<T> notLike(EntityGetFunction<T, ?> column, String value);

    ILambdaAbstractSqlWrapper<T> likeLeft(EntityGetFunction<T, ?> column, String value);

    ILambdaAbstractSqlWrapper<T> likeRight(EntityGetFunction<T, ?> column, String value);

    ILambdaAbstractSqlWrapper<T> isNull(EntityGetFunction<T, ?>... column);

    ILambdaAbstractSqlWrapper<T> isNotNull(EntityGetFunction<T, ?>... column);

    ILambdaAbstractSqlWrapper<T> in(EntityGetFunction<T, ?> column, List<?> values);

    ILambdaAbstractSqlWrapper<T> notIn(EntityGetFunction<T, ?> column, List<?> values);

    String[] getColumnName(EntityGetFunction<T, ?>... columns);

    String getColumnName(EntityGetFunction<T, ?> column);

    @Override
    ILambdaAbstractSqlWrapper<T> groupBy(String... column);

    @Override
    ILambdaAbstractSqlWrapper<T> orderBy(Map<String, String> map);

    @Override
    ILambdaAbstractSqlWrapper<T> orderBy(String column, String value);

    @Override
    ILambdaAbstractSqlWrapper<T> orderByAsc(String... columns);

    @Override
    ILambdaAbstractSqlWrapper<T> orderByDesc(String... columns);

    @Override
    ILambdaAbstractSqlWrapper<T> having(String column);

    @Override
    ILambdaAbstractSqlWrapper<T> limit(int start, int count);

    @Override
    ILambdaAbstractSqlWrapper<T> allEq(Map<String, Object> map);

    @Override
    ILambdaAbstractSqlWrapper<T> eq(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> ne(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> gt(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> ge(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> lt(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> le(String column, Object value);

    @Override
    ILambdaAbstractSqlWrapper<T> between(String column, Object value1, Object value2);

    @Override
    ILambdaAbstractSqlWrapper<T> notBetween(String column, Object value1, Object value2);

    @Override
    ILambdaAbstractSqlWrapper<T> like(String column, String value);

    @Override
    ILambdaAbstractSqlWrapper<T> notLike(String column, String value);

    @Override
    ILambdaAbstractSqlWrapper<T> likeLeft(String column, String value);

    @Override
    ILambdaAbstractSqlWrapper<T> likeRight(String column, String value);

    @Override
    ILambdaAbstractSqlWrapper<T> isNull(String... column);

    @Override
    ILambdaAbstractSqlWrapper<T> isNotNull(String... column);

    @Override
    ILambdaAbstractSqlWrapper<T> in(String column, List<?> values);

    @Override
    ILambdaAbstractSqlWrapper<T> notIn(String column, List<?> values);

    @Override
    ILambdaAbstractSqlWrapper<T> apply(String applySql, Object... params);

    @Override
    ILambdaAbstractSqlWrapper<T> or();

    @Override
    ILambdaAbstractSqlWrapper<T> and();

    @Override
    ILambdaAbstractSqlWrapper<T> or(ConditionBlock sqlBlock);

    @Override
    ILambdaAbstractSqlWrapper<T> and(ConditionBlock sqlBlock);

    @Override
    EntityBlock<T> getEntityBlock();

    @Override
    T getEntity();

    @Override
    ILambdaAbstractSqlWrapper<T> setEntity(T t);
}
